﻿using IMark.DAO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IMark
{
    public partial class DocTin : System.Web.UI.Page
    {
        public long IDTacGia;
        protected void Page_Load(object sender, EventArgs e)
        {
            if(Request.QueryString["ID"]!=null)
            {
                BAI_VIET bv = TinTucModels.LayBaiVietTheoID(long.Parse(Request.QueryString["ID"]));
                if (bv!=null && bv.Hinh!=null)
                    imgTin.ImageUrl = "images/blog/" + bv.Hinh;
                else
                    imgTin.ImageUrl = "images/blog/image2.jpg";
                TieuDe.InnerHtml = bv.TieuDe;
                NgayTao.InnerHtml = bv.NgayTao.ToString("dd/MM/yyyy");
                NguoiTao.InnerHtml = bv.NGUOI_DUNG.HoTen;
                NoiDung.InnerHtml = bv.NoiDungChiTiet;
                IDTacGia = bv.NguoiTao;
            }
        }
    }
}